<div local-class='wrapper'>
  <h2 local-class='title'>
    {{t 'components.project_settings.prompts.title'}}
  </h2>
  <p local-class='text'>
    {{t 'components.project_settings.prompts.help'}}
  </p>

  <div local-class='config'>
    <ProjectSettings::Prompts::Config @project={{@project}} @onSave={{@onSaveConfig}} @onDelete={{@onDeleteConfig}} />
  </div>

  {{#if @project.promptConfig}}
    <div local-class='content'>
      {{#if @prompts}}
        <ul local-class='list'>
          {{#each @prompts as |prompt|}}
            <li>
              <ProjectSettings::Prompts::Item @project={{@project}} @prompt={{prompt}} @onDelete={{@onDeletePrompt}} />
            </li>
          {{/each}}
        </ul>
      {{/if}}

      <LinkTo @route='logged-in.project.edit.prompts.new' @models={{array @project.id}} class='button button--xl button--primary button--highlight'>
        {{inline-svg '/assets/add.svg' class='button-icon'}}
        {{t 'components.project_settings.prompts.new_button'}}
      </LinkTo>
    </div>
  {{/if}}
</div>